home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / doc / www-talk.archive.Z / www-talk.archive / text0159.txt < prev    next >
Encoding:
Text File  |  1992-11-30  |  5.6 KB  |  144 lines

  1. Dan, you say
  2.  
  3. <<
  4. I suppose you could come up with a DTD that describes something
  5. close to the current HTML, but I'm not sure of the value of it.
  6. HTML allows tags to be pretty much sprinkled wherever you feel
  7. like putting them. Any DTD that allows that much leeway just
  8. looks like this:
  9.  
  10.         <!ENTITY % alltags "TITLE|H1|H2|H3|MENU|OL|UL">
  11.         <!ELEMENT %alltags (%alltags)*>
  12.  
  13. i.e. every element is just a repeatable or-group of all the elements.
  14. Then the SGML parser can't do any minimization cuz nothing's required. >>
  15.  
  16. Yes, current SGML currently is just a linear sequence of
  17. elements. (Sorry, current HTML -- I'm typing this in serially
  18. and can't edit!).  There is a reason for this:  it is very
  19. convenient for HTML to map onto a series of styles -- for two
  20. reasons.
  21.  
  22. Firstly, a lot of rich text objects can hold styles but can't hold
  23. structure.  You can deduce structure from the styles -- like
  24. Word deucing outlining from Heading styles, and WWW deducing
  25. a list <UL> from a lot of <LI> paragraphs. But you can't go
  26. very far.  If you want to make a HT editor out of such a
  27. text object, you ahve to regenerate the elements from the
  28. styles.
  29.  
  30. Secondly, it may be that the wysiwyg editors have a linear style
  31. structure because that is intuitive to people. I don't know
  32. a lot of people who use author/editor (which maintains
  33. structure). Maybe real people actually think in terms of styles
  34. and fix the document to look right, then they are happy to have the
  35. structure deduced.
  36.  
  37. So if we went for a nestable HTML which would be cleaner for
  38. those who apreciate recursion, we would have to have a hypertext
  39. editor which made the structure visible.  I don't have experience
  40. enough to know whether real information providers (group secretaries,
  41. for example) would be into generating nested elements -- maybe
  42. the styles are useful to keep as the current `user interface metaphor'
  43. of word processors.
  44.  
  45. (It also makes making the editor easier!)
  46.  
  47. Or maybe we should have two levels of DTD -- one basically linear
  48. and mandatory (and precompiled for fast access) and one more
  49. sophisticated for larger documents.
  50.  
  51. Of course, when you are writing hypertext the large documents are
  52. normally broken down into small bits to make traveing them quick.
  53. So whereas each hypertext node may contain only H1 and H2 headings,
  54. when a book is generated a la the_www_book.ps you get 5 levels
  55. of heading from the whole tree.
  56.  
  57. So that is why the HTML strcuture is so simple. I am open to
  58. a more sophisticated alternative.
  59.  
  60. Tim
  61. ____________________________
  62. From connolly@pixel.convex.com Fri Jun 26 00:00:33 1992
  63. Return-Path: <connolly@pixel.convex.com>
  64. Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
  65.     id AA02722; Fri, 26 Jun 92 00:00:27 MET DST
  66. Received: by dxmint.cern.ch (dxcern) (5.57/3.14)
  67.     id AA25540; Fri, 26 Jun 92 00:00:11 +0200
  68. Received: from pixel.convex.com by convex.convex.com (5.64/1.35)
  69.     id AA10700; Thu, 25 Jun 92 17:00:01 -0500
  70. Received: from localhost by pixel.convex.com (5.64/1.28)
  71.     id AA05209; Thu, 25 Jun 92 17:00:00 -0500
  72. Message-Id: <9206252200.AA05209@pixel.convex.com>
  73. To: timbl@nxoc01.cern.ch (Tim Berners-Lee)
  74. Subject: Re: HTML DTD 
  75. In-Reply-To: Your message of "Thu, 25 Jun 92 23:07:25 +0700."
  76.              <9206252107.AA02534@ nxoc01.cern.ch > 
  77. Date: Thu, 25 Jun 92 16:59:59 CDT
  78. From: Dan Connolly <connolly@pixel.convex.com>
  79. Status: R
  80.  
  81.  
  82. >thanks for that contribution.   Not being as hot on SGML
  83. >as I ought to be, I don't see why the HREF has to refer to
  84. >and entity declared separately rather than directly having
  85. >a string argument.
  86. >
  87. That's actually left over from when I was trying to point
  88. HREF attributes to MIME attachments. It's not really
  89. necessary to move the UDIs into entities as long as you're
  90. careful that the UDI syntax is a subset of the SGML
  91. attribute literal syntax.
  92.  
  93. Beware, for example, that an
  94. SGML parser will expand entity references in an attribute literal
  95. to produce the CDATA for the attribute value. So that
  96. <A HREF="A&P"> might be OK for the linemode browser,
  97. but an SGML parser will try to resolve &P.
  98.  
  99. Also, SGML attribute values have a maximum length specified
  100. in the SGML declaration. The default value is 960 or something
  101. around there.
  102.  
  103. >The title is in fact optional currently, by the way ...
  104. >we could keep it so though it "ought" always to have one.
  105. >
  106. >I'd like a DTD which as closely reflects the current HTML as
  107. >possible.
  108.  
  109. I suppose you could come up with a DTD that describes something
  110. close to the current HTML, but I'm not sure of the value of it.
  111. HTML allows tags to be pretty much sprinkled wherever you feel
  112. like putting them. Any DTD that allows that much leeway just
  113. looks like this:
  114.  
  115.     <!ENTITY % alltags "TITLE|H1|H2|H3|MENU|OL|UL">
  116.     <!ELEMENT %alltags (%alltags)*>
  117.  
  118. i.e. every element is just a repeatable or-group of all the elements.
  119. Then the SGML parser can't do any minimization cuz nothing's required.
  120.  
  121. > Then, if we change HTML to HTML2, I would
  122. >change it in a number of ways, in particular to include
  123. >separate header and body parts.  I have come across the
  124. >"Davenport" group of publishers who are defineing DTDs for
  125. >technical documentation.  They include Steve Newcombe who
  126. >is the HyTime guy (or one of the two I should say).
  127. >I would like to get some input from them.
  128. >
  129.  
  130. Certainly we should keep tabs on things like the Davenport
  131. group and HyTime.
  132.  
  133. But my immediate concern is these little sytactic differences
  134. that render HTML documents worthless to an SGML parser. The
  135. current HTML and UDI syntax make a good proof of concept, but
  136. we need to move toward formal definitions so that we can
  137. have confidence that correct implementations will interoperate.
  138.  
  139. More later...
  140.  
  141. Dan
  142.  
  143.  
  144.